gtk+3.0.git
7 years agoMerge branch 'window-activate-grab-3-again-24' into 'gtk-3-24'
Matthias Clasen [Mon, 18 Jun 2018 11:24:36 +0000 (11:24 +0000)]
Merge branch 'window-activate-grab-3-again-24' into 'gtk-3-24'

gdk: activate surface on keyboard grabs

See merge request GNOME/gtk!176

7 years agogdk: activate surface on keyboard grabs
Samuel Thibault [Fri, 1 Jun 2018 14:43:01 +0000 (16:43 +0200)]
gdk: activate surface on keyboard grabs

In 01455399e83a ("gdk: do not deactivate surface on keyboard grabs"), we
made gdk avoid deactivating surfaces when another application takes a
keyboard grab, by using has_focus_window instead of has_focus. That however
broke activating surfaces when the gdk application acquired a grab itself,
in which case has_focus_window is false but has_focus is true.

We thus actually need to use both: surfaces should be activated either
because we have normal keyboard focus, or because we grabbed the keyboard.

This also renames HAS_FOCUS to APPEARS_FOCUSED to better reflect its
role.

Fixes #85

(cherry picked from commit 3287ac96e02ff236d74db10164c5b0c1e7b2b0bf)

7 years agosearch-bar: Fix link to search-bar example
Mohammed Sadiq [Sat, 16 Jun 2018 05:05:55 +0000 (10:35 +0530)]
search-bar: Fix link to search-bar example

The master branch is now Gtk4. We should be linking to
stable branch here.

7 years agogtk: fix wheel scrolling for very small adjustment page_size
Michael Natterer [Mon, 11 Jun 2018 16:36:50 +0000 (18:36 +0200)]
gtk: fix wheel scrolling for very small adjustment page_size

For very small page sizes of < 1.0, the effect of pow() is the
opposite of what's intended and the scroll steps become unusably
large, make sure we never get a scroll_unit larger than page_size /
2.0, which used to be the default before the pow() magic was
introduced.

7 years agogdkseatdefault: Don't hide GdkWindow on grab failure
Victor Toso [Thu, 24 May 2018 13:42:47 +0000 (15:42 +0200)]
gdkseatdefault: Don't hide GdkWindow on grab failure

Application is not expecting that.

Bug found due gdk_seat_grab() failure on Lock Screen. When user
Unlock the screen, the application is visible but does not receive
enter-event any more on X11/GNOME.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422

Signed-off-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Carlos Garnacho <mrgarnacho@gmail.com>
7 years agoUpdate Polish translation
Piotr Drąg [Sun, 10 Jun 2018 13:31:47 +0000 (15:31 +0200)]
Update Polish translation

7 years agoMerge branch 'lrn/gks_vk_menu' into 'gtk-3-24'
Matthias Clasen [Fri, 8 Jun 2018 10:54:42 +0000 (10:54 +0000)]
Merge branch 'lrn/gks_vk_menu' into 'gtk-3-24'

GDK W32: Don't forget to check VK_MENU and set MK_ALT

See merge request GNOME/gtk!181

7 years agoMerge branch 'wip/tchaik/fontconfig-timestamp' into 'gtk-3-24'
Matthias Clasen [Thu, 7 Jun 2018 19:52:02 +0000 (19:52 +0000)]
Merge branch 'wip/tchaik/fontconfig-timestamp' into 'gtk-3-24'

wayland: Implement 'gtk-fontconfig-timestamp' & 'gtk-modules'

See merge request GNOME/gtk!157

7 years agoMerge branch 'gtk-3-24' into 'gtk-3-24'
Matthias Clasen [Thu, 7 Jun 2018 18:30:48 +0000 (18:30 +0000)]
Merge branch 'gtk-3-24' into 'gtk-3-24'

Fix reference to user styles in gtkstyleprovider.h

See merge request GNOME/gtk!183

7 years agofont-button: Suggest non deprecated function in docs
Mohammed Sadiq [Thu, 7 Jun 2018 10:14:14 +0000 (15:44 +0530)]
font-button: Suggest non deprecated function in docs

gtk_font_button_get_font_name() has been deprecated in 3.22 and
its public API is removed from GTK4.

7 years agoFix reference to user styles in gtkstyleprovider.h
Matijs van Zuijlen [Thu, 7 Jun 2018 08:49:59 +0000 (08:49 +0000)]
Fix reference to user styles in gtkstyleprovider.h

7 years agoUpdate Catalan translation
Jordi Mas [Wed, 6 Jun 2018 17:58:34 +0000 (18:58 +0100)]
Update Catalan translation

7 years agoUpdate Catalan translation
Jordi Mas [Wed, 6 Jun 2018 07:25:49 +0000 (08:25 +0100)]
Update Catalan translation

7 years agoGDK W32: Don't forget to check VK_MENU and set MK_ALT
Руслан Ижбулатов [Wed, 6 Jun 2018 01:06:38 +0000 (01:06 +0000)]
GDK W32: Don't forget to check VK_MENU and set MK_ALT

7 years agoMerge branch '1088-getting-css-properties-defined-in-em-etc-in-px-rounds-toward-0...
Matthias Clasen [Tue, 5 Jun 2018 22:12:45 +0000 (22:12 +0000)]
Merge branch '1088-getting-css-properties-defined-in-em-etc-in-px-rounds-toward-0-delivering-1-too-few-pixels' into 'gtk-3-24'

Resolve "Getting CSS properties defined in em (etc.) in px rounds toward 0, delivering 1 too few pixels"

See merge request GNOME/gtk!158

7 years agoCssGadget: Round px values up for min-width|height
Daniel Boles [Mon, 21 May 2018 20:40:39 +0000 (21:40 +0100)]
CssGadget: Round px values up for min-width|height

Otherwise, requesting a min size in em where the equivalent in px had a
fractional part would lead to the gadget getting allocated 1 too few px.
You could see this in the CSS property vs. allocation in the Inspector.

Note that margin/border/padding are left alone: the rationale is that we
do as browsers do, and Benjamin said we already do that for those,
whereas his tests on min-(width|height) showed otherwise.  My subsequent
analysis indicated it to be far less clear-cut than that, but he remains
unconvinced that we should ceil() all the things! So just do these ones.

https://gitlab.gnome.org/GNOME/gtk/issues/1088

7 years agodocs: Add indices for 3.24 api
Matthias Clasen [Tue, 5 Jun 2018 17:07:05 +0000 (13:07 -0400)]
docs: Add indices for 3.24 api

We have some now.

7 years agoAdd new fontchooser api to the docs
Matthias Clasen [Tue, 5 Jun 2018 17:01:55 +0000 (13:01 -0400)]
Add new fontchooser api to the docs

We have docs.

7 years agoAdd gdk_window_move_to_rect to the docs
Matthias Clasen [Tue, 5 Jun 2018 17:00:11 +0000 (13:00 -0400)]
Add gdk_window_move_to_rect to the docs

We have docs.

7 years agoMerge branch 'wip/move-to-rect-public-gtk-3-24' into 'gtk-3-24'
Matthias Clasen [Tue, 5 Jun 2018 16:57:46 +0000 (16:57 +0000)]
Merge branch 'wip/move-to-rect-public-gtk-3-24' into 'gtk-3-24'

gdk: Make gdk_window_move_to_rect public (gtk-3-24)

See merge request GNOME/gtk!180

7 years agogdk: Make gdk_window_move_to_rect public
Jonas Ådahl [Tue, 5 Jun 2018 13:01:52 +0000 (15:01 +0200)]
gdk: Make gdk_window_move_to_rect public

This is the API used by GtkMenu to properly position menus on the screen
without requiring GTK to query the menu window's position or the work
area of where the window is positioned. It makes it possible to position
popup windows properly when using Wayland.

Make this API available to external users so custom popup windows can be
positioned properly as well.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/997
7 years agoUpdate NEWS
Matthias Clasen [Mon, 4 Jun 2018 10:53:39 +0000 (06:53 -0400)]
Update NEWS

7 years agoBump version to 3.23.0
Matthias Clasen [Mon, 4 Jun 2018 21:06:30 +0000 (17:06 -0400)]
Bump version to 3.23.0

Yes, we are adding some api here.

7 years agoMiscellaneous font chooser fixes
Matthias Clasen [Mon, 4 Jun 2018 11:21:27 +0000 (07:21 -0400)]
Miscellaneous font chooser fixes

Fix various oversights in the backports of the
font chooser features.

7 years agofont chooser: Make the language property writable
Matthias Clasen [Mon, 2 Apr 2018 17:34:22 +0000 (13:34 -0400)]
font chooser: Make the language property writable

This is meant as an input to the font chooser.
We don't want the user to select a language, but
rather have fonts presented as they would work for
the current language. Therefore, do away with the
lang/script combo on the tweak page.

7 years agofont chooser: Add examples for font features
Matthias Clasen [Sun, 1 Apr 2018 23:35:55 +0000 (19:35 -0400)]
font chooser: Add examples for font features

For some font features, we can figure out affected
glyphs, and show before/after. For some others, we
hardcode typical sequences.

Still to do: figure out how to find ligatures and
show them.

7 years agoAdd a 3.24 version
Matthias Clasen [Mon, 4 Jun 2018 11:16:35 +0000 (07:16 -0400)]
Add a 3.24 version

7 years agoMerge branch 'gtk-3-24' into 'gtk-3-24'
Matthias Clasen [Sun, 3 Jun 2018 23:21:33 +0000 (23:21 +0000)]
Merge branch 'gtk-3-24' into 'gtk-3-24'

GtkWindow: Handle non-square icons with height > width correctly

See merge request GNOME/gtk!173

7 years agoGtkWindow: Handle non-square icons with height > width correctly
Christian Stadelmann [Sun, 3 Jun 2018 19:05:46 +0000 (21:05 +0200)]
GtkWindow: Handle non-square icons with height > width correctly

7 years agomenu: Remove unstable annotations
Matthias Clasen [Sun, 3 Jun 2018 13:48:40 +0000 (09:48 -0400)]
menu: Remove unstable annotations

These apis are not going to change in GTK+ 3.x.

7 years agoDrop Ctrl-Shift-e support
Matthias Clasen [Fri, 1 Jun 2018 15:59:55 +0000 (11:59 -0400)]
Drop Ctrl-Shift-e support

Now that we have Emoji completion, drop the rather limited
Ctrl-Shift-e support in GtkIMContextSimple, and leave this
sequence to input methods.

7 years agowidget-factory: add emoji completion to an entry
Matthias Clasen [Tue, 15 Aug 2017 21:35:03 +0000 (17:35 -0400)]
widget-factory: add emoji completion to an entry

7 years agoentry: Add emoji completion
Matthias Clasen [Sat, 19 Aug 2017 18:08:15 +0000 (14:08 -0400)]
entry: Add emoji completion

Pop up completions when the text in the entry matches :word:
This functionality has to be enabled using the enable-emoji-completion
property.

7 years agoAdd an emoji completion popup
Matthias Clasen [Sat, 19 Aug 2017 18:06:47 +0000 (14:06 -0400)]
Add an emoji completion popup

This widget provides entry completion-like functionality
for Emoji codes like :grin: or :kiss:.

7 years agoExport some entry functions privately
Matthias Clasen [Sat, 19 Aug 2017 18:07:59 +0000 (14:07 -0400)]
Export some entry functions privately

This will be used in the following commits.

7 years agoemoji: Hide recent section when empty
Matthias Clasen [Thu, 17 May 2018 15:48:34 +0000 (16:48 +0100)]
emoji: Hide recent section when empty

This is part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.

7 years agoemoji: Improve section scrolling
Matthias Clasen [Thu, 17 May 2018 15:37:26 +0000 (16:37 +0100)]
emoji: Improve section scrolling

Leave some space above the section heading when scrolling.

This is a part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.

7 years agoUpdate Catalan translation
Jordi Mas [Sun, 3 Jun 2018 10:13:19 +0000 (12:13 +0200)]
Update Catalan translation

7 years agotreeview: respect expander-size style property
Christian Hergert [Fri, 6 May 2016 13:12:29 +0000 (16:12 +0300)]
treeview: respect expander-size style property

Without enforcement to the expander-size, we can end up rendering icons
rather fuzzy. This uses the expander-size style property to determine
the square for the icon, centered on what was the calculated space for
the expander.

7 years agowidget: Fix example code in doc
Mohammed Sadiq [Thu, 31 May 2018 10:54:00 +0000 (16:24 +0530)]
widget: Fix example code in doc

7 years agowayland: Implement'gtk-fontconfig-timestamp' & 'gtk-modules'
Martin Blanchard [Mon, 12 Mar 2018 20:16:25 +0000 (20:16 +0000)]
wayland: Implement'gtk-fontconfig-timestamp' & 'gtk-modules'

The 'gtk-fontconfig-timestamp' and 'gtk-modules' settings are
currently not available at all on Wayland. On X11, they are
implemented through xsettings maintained up-to-date by
gnome-settings-daemon.

This patch implements both GtkSettings for Wayland using a
new dbus interface also provided by gnome-settings-daemon.

Closes #886

7 years agogtksocket: Adjust X sizes by scale-factor
Jason Zaman [Fri, 25 May 2018 03:37:45 +0000 (11:37 +0800)]
gtksocket: Adjust X sizes by scale-factor

X uses unscaled sizes, so they must be scaled properly. Otherwise
GtkSockets end up twice as big as they should be.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=765327
Signed-off-by: Jason Zaman <jason@perfinion.com>
Close !165

7 years agoMerge branch 'gtksocket-scale-3-22' into 'gtk-3-22'
Emmanuele Bassi [Wed, 30 May 2018 10:18:56 +0000 (10:18 +0000)]
Merge branch 'gtksocket-scale-3-22' into 'gtk-3-22'

gtksocket: Adjust X sizes by scale-factor

See merge request GNOME/gtk!164

7 years agoMerge branch 'gesture-docs' into 'master'
Matthias Clasen [Wed, 30 May 2018 02:13:04 +0000 (02:13 +0000)]
Merge branch 'gesture-docs' into 'master'

Gesture stuff

See merge request GNOME/gtk!169

(cherry picked from commit 8b24d59cde9410db28c7b61d323fa8b1f0180300)

334c7911 gesture: Fix get_last_event() docs
e9765c04 gesture: Fix code snippet
4d2b39d9 gesturemultipress: Don’t fire ::released after ::cancel

7 years agoMerge branch 'gesture-docs' into 'master'
Matthias Clasen [Wed, 30 May 2018 02:13:04 +0000 (02:13 +0000)]
Merge branch 'gesture-docs' into 'master'

Gesture stuff

See merge request GNOME/gtk!169

(cherry picked from commit 8b24d59cde9410db28c7b61d323fa8b1f0180300)

334c7911 gesture: Fix get_last_event() docs
e9765c04 gesture: Fix code snippet
4d2b39d9 gesturemultipress: Don’t fire ::released after ::cancel

7 years agox11: Don't set NET_WM_PID when sandboxed
Matthias Clasen [Mon, 28 May 2018 16:09:47 +0000 (12:09 -0400)]
x11: Don't set NET_WM_PID when sandboxed

It is not useful, and some window managers misinterpret it and
add some "runs as root" indication to the window decoration.

See https://github.com/mate-desktop/marco/issues/301

7 years agogdk: Add a private api to find sandboxes
Matthias Clasen [Mon, 28 May 2018 16:04:17 +0000 (12:04 -0400)]
gdk: Add a private api to find sandboxes

This will be used in more places in the future.

7 years agoUpdate Spanish translation
Daniel Mustieles [Mon, 28 May 2018 15:53:58 +0000 (15:53 +0000)]
Update Spanish translation

7 years agogdkdnd: Fix 2 typos in docs
Daniel Boles [Sun, 27 May 2018 17:10:02 +0000 (18:10 +0100)]
gdkdnd: Fix 2 typos in docs

7 years agoci: update the docker image to fedora 28
Christoph Reiter [Sun, 27 May 2018 16:38:28 +0000 (18:38 +0200)]
ci: update the docker image to fedora 28

So we get a newer pango

7 years agoMerge branch 'gtk-3-24' into 'gtk-3-24'
Matthias Clasen [Sun, 27 May 2018 15:50:45 +0000 (15:50 +0000)]
Merge branch 'gtk-3-24' into 'gtk-3-24'

icontheme: Keep dir_mtimes in order

See merge request GNOME/gtk!162

7 years agoUpdate Polish translation
Piotr Drąg [Sun, 27 May 2018 06:16:50 +0000 (08:16 +0200)]
Update Polish translation

7 years agoUpdate POTFILES.in and POTFILES.skip
Piotr Drąg [Sun, 27 May 2018 06:03:18 +0000 (08:03 +0200)]
Update POTFILES.in and POTFILES.skip

7 years agoSpinButton: Fix an obviously wrong arg description
Daniel Boles [Sat, 26 May 2018 00:06:00 +0000 (01:06 +0100)]
SpinButton: Fix an obviously wrong arg description

:climb-rate is not about what you get when you single-click on a button,
as this implied: it's what happens if you hold down a button or a key.
Fix the description of @climb_rate to new(), and while here, mention the
key in the blurb of :climb-rate itself.

7 years agoGdkWin: Avoid leak if bailing from process_updates
Daniel Boles [Tue, 22 May 2018 00:16:04 +0000 (01:16 +0100)]
GdkWin: Avoid leak if bailing from process_updates

There is no point creating the list if we don't need to because we are
failing out, and even less point in leaking it in that case.

7 years agoStyleContext: Add a missing apostrophe
Daniel Boles [Mon, 21 May 2018 23:00:32 +0000 (00:00 +0100)]
StyleContext: Add a missing apostrophe

(or rather, the right single quote dictated by the HIG, which is
semantically not an apostrophe at all! I will die on this hill.)

7 years agowayland: check native window for crossing events
Olivier Fourdan [Thu, 19 Apr 2018 12:22:04 +0000 (14:22 +0200)]
wayland: check native window for crossing events

gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab window,
so if the grab is issued on a child gdk window, those won't match and we
would emit more focus_out events than focus_in events.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the window and releases the grab when it
leaves the window would get uneven numbers of focus_in/focus_out events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native windows to emit crossing events when needed that get
called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk_Wayland
_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/792
7 years agogtksocket: Adjust X sizes by scale-factor
Jason Zaman [Fri, 25 May 2018 03:37:45 +0000 (11:37 +0800)]
gtksocket: Adjust X sizes by scale-factor

X uses unscaled sizes, so they must be scaled properly. Otherwise
GtkSockets end up twice as big as they should be.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=765327
Signed-off-by: Jason Zaman <jason@perfinion.com>
7 years agoicontheme: Keep dir_mtimes in order
Jan Alexander Steffens (heftig) [Wed, 23 May 2018 18:06:01 +0000 (20:06 +0200)]
icontheme: Keep dir_mtimes in order

Don't reverse the order each time we insert a theme. Reverse it only
once, after all themes have been loaded.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1115

7 years agoMerge branch 'bz780422' into 'gtk-3-22'
Carlos Garnacho [Tue, 22 May 2018 11:06:35 +0000 (11:06 +0000)]
Merge branch 'bz780422' into 'gtk-3-22'

wayland: check native window for crossing events

See merge request GNOME/gtk!147

7 years agoStyleContext: Don't advise using invalidate()
Daniel Boles [Mon, 21 May 2018 22:38:23 +0000 (23:38 +0100)]
StyleContext: Don't advise using invalidate()

It's deprecated. Also, set_screen() is not used/needed in the demo cited

7 years agoRemove the "without parent" warning
Matthias Clasen [Mon, 21 May 2018 21:15:41 +0000 (17:15 -0400)]
Remove the "without parent" warning

We've had it for a long time, and it hasn't really made
a difference. And I don't think we are prepared to turn
this into a hard error. So just drop it.

7 years agoRange: Up should only mean ++ if we are a GtkScale
Daniel Boles [Mon, 21 May 2018 18:42:57 +0000 (19:42 +0100)]
Range: Up should only mean ++ if we are a GtkScale

The last round of patches to get the desired direction of value move in
response to scrolls/keypresses on scales had the inadvertent side effect
of giving the opposite direction on scrollbars. Seeing as gtkrange.c is
already a collection of hacks, add another so that fix only holds if the
instance is a GtkScale, since that is what those patches were aimed at.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1065

7 years agoProgressBar: Fix typo in doc comment
Daniel Boles [Sun, 20 May 2018 18:28:13 +0000 (19:28 +0100)]
ProgressBar: Fix typo in doc comment

7 years agoRange: Up should only mean ++ if we are a GtkScale
Daniel Boles [Mon, 21 May 2018 18:42:57 +0000 (19:42 +0100)]
Range: Up should only mean ++ if we are a GtkScale

The last round of patches to get the desired direction of value move in
response to scrolls/keypresses on scales had the inadvertent side effect
of giving the opposite direction on scrollbars. Seeing as gtkrange.c is
already a collection of hacks, add another so that fix only holds if the
instance is a GtkScale, since that is what those patches were aimed at.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1065

7 years agoProgressBar: Fix typo in doc comment
Daniel Boles [Sun, 20 May 2018 18:28:13 +0000 (19:28 +0100)]
ProgressBar: Fix typo in doc comment

7 years agofont chooser: Support font variations
Matthias Clasen [Sat, 31 Mar 2018 18:43:04 +0000 (14:43 -0400)]
font chooser: Support font variations

Add sliders for the axes on the tweak page.

7 years agofont chooser: Add properties for font features and language
Matthias Clasen [Sat, 31 Mar 2018 13:57:34 +0000 (09:57 -0400)]
font chooser: Add properties for font features and language

These can't be returned as part of the font description,
so we need new api for them. For now, this is just readonly
properties. Maybe these should be writable too, eventually.

7 years agofont chooser: Add font features
Matthias Clasen [Sat, 31 Mar 2018 13:37:18 +0000 (09:37 -0400)]
font chooser: Add font features

Populate the tweak page with OpenType font features.

7 years agofont chooser: Add a tweak page
Matthias Clasen [Sat, 31 Mar 2018 02:49:07 +0000 (22:49 -0400)]
font chooser: Add a tweak page

7 years agofont chooser: introduce font chooser levels
Matthias Clasen [Fri, 30 Mar 2018 19:02:49 +0000 (15:02 -0400)]
font chooser: introduce font chooser levels

This is a more systematic approach to reducing the
level of detail in the font chooser.

7 years agoBump the pango requirement
Matthias Clasen [Sat, 31 Mar 2018 17:35:16 +0000 (13:35 -0400)]
Bump the pango requirement

We want to use the new font variation api in pango 1.41.

7 years agoAdd a flatpak manifest for widget-factory
Matthias Clasen [Thu, 17 May 2018 18:28:28 +0000 (19:28 +0100)]
Add a flatpak manifest for widget-factory

This makes it easier to build GTK+.

7 years agoMerge branch '1053-scroll-cursor-gets-left-behind-if-a-child-widget-steals-the-scroll...
Matthias Clasen [Thu, 17 May 2018 15:19:49 +0000 (15:19 +0000)]
Merge branch '1053-scroll-cursor-gets-left-behind-if-a-child-widget-steals-the-scroll' into 'gtk-3-22'

Resolve "Scroll cursor gets left behind if a child widget steals the scroll"

See merge request GNOME/gtk!134

7 years agotextview: Don't scroll for pastes in another view
Matthias Clasen [Mon, 14 May 2018 12:03:34 +0000 (13:03 +0100)]
textview: Don't scroll for pastes in another view

GtkTextView scrolls to the insertion point when the text
buffer signals a paste is done. This is wrong when there
are multiple views on the same buffer, and the paste
happened in another view.

To fix this, flip the handling of the scroll_after_paste
boolean to only be TRUE if we know that we want to scroll.

7 years agoMerge branch '1069-thread-1-glade-received-signal-sigfpe-arithmetic-exception' into...
Benjamin Otte [Wed, 16 May 2018 12:48:46 +0000 (12:48 +0000)]
Merge branch '1069-thread-1-glade-received-signal-sigfpe-arithmetic-exception' into 'gtk-3-22'

Resolve "Thread 1 "glade" received signal SIGFPE, Arithmetic exception."

See merge request GNOME/gtk!151

7 years agoappchooserdialog: Fix memory leak
Mohammed Sadiq [Sun, 13 May 2018 07:57:07 +0000 (13:27 +0530)]
appchooserdialog: Fix memory leak

7 years agoappchooserdialog: Don't fire notify::heading twice
Mohammed Sadiq [Sun, 13 May 2018 07:51:06 +0000 (13:21 +0530)]
appchooserdialog: Don't fire notify::heading twice

The gtk_app_chooser_dialog_set_heading() function do emit
notify::heading. Since the setter simply calls the function,
the setter itself shouldn't emit a notify signal by itself.

7 years agotextview: Always show select-all button in touch popup
Mohammed Sadiq [Fri, 11 May 2018 04:49:09 +0000 (10:19 +0530)]
textview: Always show select-all button in touch popup

"Select all" action is possible regardless of the text selection state
or if the text is editable or not.

7 years agotextview: Simplify creating bubble action buttons
Mohammed Sadiq [Fri, 11 May 2018 03:17:56 +0000 (08:47 +0530)]
textview: Simplify creating bubble action buttons

Buttons can be created simply with gtk_button_new_from_icon_name().

7 years agoGtkBox: do not divide by zero on gtk_box_size_allocate_with_center()
Juan Pablo Ugarte [Sat, 12 May 2018 14:06:37 +0000 (11:06 -0300)]
GtkBox: do not divide by zero on gtk_box_size_allocate_with_center()

https://gitlab.gnome.org/GNOME/gtk/issues/1069

7 years agoVisual Studio 2008 builds: Generate gtk/gtktypefuncs.c
Chun-wei Fan [Sat, 12 May 2018 03:03:55 +0000 (11:03 +0800)]
Visual Studio 2008 builds: Generate gtk/gtktypefuncs.c

This is the updates to the Visual Studio 2008 projects to generate
gtk/gtktypefuncs.c using the preprocessor and the gentypefuncs.py that
was adapted from master.

Unfortunately we could not clean up the projects as we did for the 201x
ones due to the differences in project file format.

7 years agoVisual Studio 201x builds: Clean up project files
Chun-wei Fan [Sat, 12 May 2018 02:52:47 +0000 (10:52 +0800)]
Visual Studio 201x builds: Clean up project files

Combine repetitive parts, and unify using $(PythonDir) for all builds,
which the paths set in the property sheets are now based on the Visual
Studio version and platform combination.

7 years agoVisual Studio 201x builds: Fix previous commit
Chun-wei Fan [Sat, 12 May 2018 02:24:59 +0000 (10:24 +0800)]
Visual Studio 201x builds: Fix previous commit

Not that it will make a difference, but to be consistent with the
autotools builds.  Include gtkx.h instead of gtk.h when we generate the
source to feed to the preprocessor.

7 years agoVisual Studio 201x builds: Generate gtk/gtktypefuncs.c
Chun-wei Fan [Fri, 11 May 2018 17:12:23 +0000 (01:12 +0800)]
Visual Studio 201x builds: Generate gtk/gtktypefuncs.c

We now need to generate gtktypefuncs.c by ourselves, so modify the
gentypefuncs.py script from master, and add a custom build step in the
projects to generate gtktypefuncs.c.  The custom build step for the 2008
projects will be added later.

7 years agoMerge branch 'wip/restart-cursor-animation-gtk-3' into 'gtk-3-22'
Matthias Clasen [Fri, 11 May 2018 15:24:55 +0000 (15:24 +0000)]
Merge branch 'wip/restart-cursor-animation-gtk-3' into 'gtk-3-22'

wayland: Fix restarting cursor animation

See merge request GNOME/gtk!150

7 years agogtk/Makefile.am: Fix Visual Studio project generation
Chun-wei Fan [Fri, 11 May 2018 10:05:46 +0000 (18:05 +0800)]
gtk/Makefile.am: Fix Visual Studio project generation

We now need the generated sources to be included explicitly in the list
so that they get listed in the project files to be built.

7 years agowayland: Fix restarting cursor animation
Jonas Ådahl [Wed, 9 May 2018 20:13:10 +0000 (22:13 +0200)]
wayland: Fix restarting cursor animation

When an animated cursor was set and the previous cursor animation delay
happened to be the same, we wouldn't restart the animation timeout and
just return G_SOURCE_CONTINUE assuming the timer would continue. This
assumption is however only valid if the function was called from the
timeout, which is not the case.

Instead also arm the timer also if there is no previous timer active.

7 years agowayland: check native window for crossing events
Olivier Fourdan [Thu, 19 Apr 2018 12:22:04 +0000 (14:22 +0200)]
wayland: check native window for crossing events

gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab window,
so if the grab is issued on a child gdk window, those won't match and we
would emit more focus_out events than focus_in events.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the window and releases the grab when it
leaves the window would get uneven numbers of focus_in/focus_out events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native windows to emit crossing events when needed that get
called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk_Wayland
_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/792
7 years ago[Quartz] Hardcode screen resolution for text at 96.0.
John Ralls [Tue, 1 May 2018 03:34:45 +0000 (20:34 -0700)]
[Quartz] Hardcode screen resolution for text at 96.0.

It seems that CoreText is internally calibrated for this, see
https://bugzilla.gnome.org/show_bug.cgi?id=787867 for a detailed
discussion.

7 years agogtk: Fix reserved pointers
Benjamin Otte [Tue, 10 Apr 2018 12:22:16 +0000 (14:22 +0200)]
gtk: Fix reserved pointers

So gcc stops complaining about unnecessary parenthesis.

Closes #1059

7 years agoRange: Bin pointless check before emitting signal
Björn Lindqvist [Mon, 24 Mar 2008 21:31:22 +0000 (21:31 +0000)]
Range: Bin pointless check before emitting signal

In scroll_event(), there is no need to check whether we are realized
before emitting ::change-value, as we must be when receiving an event.

Git-formatted/rebased/cleaned up by Daniel Boles <dboles.src@gmail.com>

Close https://gitlab.gnome.org/GNOME/gtk/issues/292

7 years agoMenu: cleanups for previous commit and nearby
Daniel Boles [Sun, 6 May 2018 10:41:12 +0000 (11:41 +0100)]
Menu: cleanups for previous commit and nearby

• #include <math.h> for the new uses of floor()
• Move the new ints and popdown_data into the scopes where they are used
• Don’t pointlessly init other ints to 0 as they always get reassigned
• Burninate gint

7 years agoMenu: Fix broken navigation triangle/hysteresis
Sam Douglas [Tue, 15 Nov 2016 02:57:43 +0000 (02:57 +0000)]
Menu: Fix broken navigation triangle/hysteresis

This issue was caused when mouse coordinates were changed to floating
point values in commit e8b38fedbd8961df4aaaa75b122a06ddc68e75f2.

This patch floors the event->x_root and event->y_root values when
setting the navigation region, so the previous behaviour is restored.

https://gitlab.gnome.org/GNOME/gtk/issues/450

7 years agoScrolledWindow: Unset cursor if child takes scroll
Daniel Boles [Sat, 5 May 2018 10:40:43 +0000 (11:40 +0100)]
ScrolledWindow: Unset cursor if child takes scroll

https://gitlab.gnome.org/GNOME/gtk/issues/1053

7 years agox11: Set a transparent background on windows by default
Benjamin Otte [Fri, 4 May 2018 09:26:15 +0000 (11:26 +0200)]
x11: Set a transparent background on windows by default

This avoids black flicker on compositing WMs when a window is first shown.

7 years agoemoji chooser: Match search terms better
Matthias Clasen [Fri, 4 May 2018 00:18:48 +0000 (20:18 -0400)]
emoji chooser: Match search terms better

Use g_str_match_string for better results.

cherry-pick of be2853e5deb60274e43352352de74dc458908fe2

https://gitlab.gnome.org/GNOME/gtk/issues/898

7 years agoMerge branch 'wip/lantw/gtk3-use-dev-evdev-input-h-on-freebsd' into 'gtk-3-22'
Matthias Clasen [Wed, 2 May 2018 10:56:25 +0000 (10:56 +0000)]
Merge branch 'wip/lantw/gtk3-use-dev-evdev-input-h-on-freebsd' into 'gtk-3-22'

wayland: Use dev/evdev/input.h on FreeBSD (GTK3)

See merge request GNOME/gtk!132

7 years agoUpdate Finnish translation
Jiri Grönroos [Tue, 1 May 2018 19:47:02 +0000 (19:47 +0000)]
Update Finnish translation

7 years agowayland: Use dev/evdev/input.h on FreeBSD
Ting-Wei Lan [Tue, 1 May 2018 14:00:31 +0000 (22:00 +0800)]
wayland: Use dev/evdev/input.h on FreeBSD

The header linux/input.h used by GDK is specific to Linux. It is
possible to get a few Linux headers on FreeBSD by installing v4l_compat,
but it is usually better to use the one shipped with FreeBSD.

We prefer dev/evdev/input.h to linux/input.h here, so it will always use
dev/evdev/input.h on FreeBSD regardless of v4l_compat.

https://svnweb.freebsd.org/changeset/ports/465644